function func160(module, exports, __webpack_require__) {
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: !0
    });
    var _extends2 = __webpack_require__(48),
      _extends3 = _interopRequireDefault(_extends2),
      _javascript_compressed = __webpack_require__(165),
      _javascript_compressed2 = _interopRequireDefault(_javascript_compressed),
      _openModal = __webpack_require__(84),
      _message = __webpack_require__(85),
      _message2 = _interopRequireDefault(_message),
      _tool = __webpack_require__(26),
      _LANGUAGE = __webpack_require__(54),
      _LANGUAGE2 = _interopRequireDefault(_LANGUAGE);
  
    function _interopRequireDefault(e) {
      return e && e.__esModule ? e : {
        default: e
      }
    }
    var lang = (0, _tool.getQueryVariable)("lang");
    lang || (lang = "cn"), _javascript_compressed2.default.Field.prototype.EDITABLE = !1, window.funcList = {}, window.isWaitingBlueStatus = !1, window.blurPortIndex = 0, window.blurPortType = 0, window.waitSetInterval = null, window.blueCallbackStr = "", window.getInputFunObj = {}, window.motorStrArr = ["0x33", "0x49", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0x00", "0xcc"], window.blueCallback = function(e) {
      //console.log("更新蓝牙连接状态(blueCallback)>>>" + e), window.changeBlueLink("1" == e)
    }, window.blueSend = function() {
      // var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
      // try {
      //   window.callAppFun("blueSend", {
      //     blueStr: e
      //   })
      // } catch (e) {
      //   //console.log("当前环境蓝牙发送未定义或失败>>>", e)
      // }
      // "33aaaaaafecc" == e ? (console.log("机器人复位初始状态"), window.markBlueInfo(0, 77)) : window.webkit || window.app || (console.log("宿主环境没有被注册蓝牙发送方法--0.1秒后模拟蓝牙回调,主动调用window.blueSendDataCallback"), setTimeout((function() {
      //   window.blueSendDataCallback('{"blueStr":"33490103000151cc","status":"1"}'), window.blueSendDataCallback('{"blueStr":"33120103000151cc","status":"1"}')
      // }), 10))
    }, window.blueSendDataCallback = function() {
      // var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "",
      //   t = window.checkBlueInfo(e);
      // t ? (window.isWaitingBlueStatus = !1, window.blueCallbackStr = e, console.log("APP使用蓝牙回调方法成功")) : window.webkit || window.app ? console.log("错误匹配-与蓝牙等待预期类型不符", e) : (console.log("模拟回调》》》》网页调试环境模拟回调成功"), window.isWaitingBlueStatus = !1, window.blueCallbackStr = e)
    }, window.stopRunFunc = function() {
      window.stopJSandRobot()
    }, window.sendAndWaitCallBack = function(e) {
      // var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : function() {};
      // if (clearInterval(window.waitSetInterval), !window.isWaitingBlueStatus) {
      //   var o = window.getBlueStr(e.str, e.yzArr, e.yzIndex);
      //   //console.log("%c蓝牙发送>>--" + o + "--<<", "color:#4e99ff;"), window.isWaitingBlueStatus = !0, window.blueSend(o)
      // }
      // window.checkBackInfo(t), window.waitSetInterval = setInterval((function() {
      //   window.checkBackInfo(t)
      // }), 100)
    }, window.checkBackInfo = function(e) {
      window.isWaitingBlueStatus || (console.log("%c蓝牙回调>>--" + (window.blueCallbackStr ? window.blueCallbackStr : "无回调字符串") + "--<<", "color:#18d43c;"), e(window.blueCallbackStr), clearInterval(window.waitSetInterval))
    }, window.getBlueStr = function(str) {
      // var needIndex = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [],
      //   yzIndex = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
      // console.log(str, "str"), console.log(needIndex, "needIndex"), console.log(yzIndex, "yzIndex");
      // var arr = str.split(","),
      //   addNum = [];
      // arr.map((function(e, t) {
      //   needIndex.map((function(o) {
      //     t == o && addNum.push(e)
      //   }))
      // }));
      // var num = 0;
      // addNum.map((function(item) {
      //   num += eval(item)
      // })), console.log(num, "num1"), num = num.toString(16), console.log(num, "num2"), arr[yzIndex] = "0x" + num.substring(num.length - 2), console.log(addNum.join("+") + "---校验和>>>" + arr[yzIndex]);
      // var rStr = arr.join("")
      //   .replace(/0x/g, "");
      // return console.log("replace", rStr), rStr
    }, window.markBlueInfo = function(e, t) {
      // window.blurPortIndex = e, window.blurPortType = t
    }, window.checkBlueInfo = function(e) {
      // var t = JSON.parse(e),
      //   o = Number(t.blueStr[2] + t.blueStr[3]),
      //   n = Number(t.blueStr[4] + t.blueStr[5]),
      //   i = Number(t.blueStr[6] + t.blueStr[7]);
      // return console.log("蓝牙回调CMD类型》》" + o), console.log("蓝牙等待CMD类型》》" + window.blurPortType), 50 == o && 50 == window.blurPortType || (77 == o && 77 == window.blurPortType || (78 == o && 78 == window.blurPortType || (49 == o && 49 == window.blurPortType || (19 == o && 19 == window.blurPortType || ((12 == o || 23 == o) && window.blurPortType == i && window.blurPortIndex == n || void 0)))))
    }, window.getSensorValByBlue = function(e, t) {
      // var o = "0x33," + e.join(",") + ",0xcc",
      //   n = Number(e[1].replace("0x", "")),
      //   i = Number(e[2].replace("0x", ""));
      // console.log("设置当前蓝牙回调标记", n, i), window.markBlueInfo(n, i), window.sendAndWaitCallBack({
      //   str: o,
      //   yzIndex: 6,
      //   yzArr: [1, 2, 3, 4, 5]
      // }, (function(e) {
      //   var o = JSON.parse(e),
      //     n = o.blueStr[8] + o.blueStr[9] + o.blueStr[10] + o.blueStr[11];
      //   n = parseInt(n, 16), t(n)
      // }))
    }, window.setMuiscByBlue = function(e, t) {
      // var o = "0x33," + e.join(",") + ",0xcc";
      // window.markBlueInfo(0, 78), window.sendAndWaitCallBack({
      //   str: o,
      //   yzIndex: 5,
      //   yzArr: [1, 2, 3, 4]
      // }, (function(e) {
      //   t()
      // }))
    }, window.setLampByBlue = function(e, t) {
      // var o = "0x33," + e.join(",") + ",0xcc";
      // window.markBlueInfo(3, 50), window.sendAndWaitCallBack({
      //   str: o,
      //   yzIndex: 10,
      //   yzArr: [1, 2, 3, 4, 5, 6, 7, 8, 9]
      // }, (function(e) {
      //   t()
      // }))
    }, window.setMotorConfigWithBlue = function() {
      // var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
      //   t = arguments[1],
      //   o = Object.keys(e);
      // o.map((function(t) {
      //   window.motorStrArr[2 * t] = e[t][0], window.motorStrArr[2 * t + 1] = e[t][1]
      // }));
      // var n = window.motorStrArr.join(",");
      // window.markBlueInfo(0, 49), window.sendAndWaitCallBack({
      //   str: n,
      //   yzIndex: 14,
      //   yzArr: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
      // }, (function(e) {
      //   t(e)
      // }))
    }, window.sfMotorConfig = ["0xFF,0x00,0x00,0x00,0x00,0x00", "0xFF,0x00,0x00,0x00,0x00,0x00"], window.sfBlueStr = "", window.setSFMotorConfigWithBlue = function(e) {
      window.sfBlueStr = "0x33,0x19," + window.sfMotorConfig[0] + "," + window.sfMotorConfig[1] + ",0xff,0xcc", console.log("设置伺服电机---" + window.sfBlueStr), window.markBlueInfo(0, 19), window.sendAndWaitCallBack({
        str: window.sfBlueStr,
        yzIndex: 14,
        yzArr: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
      }, (function(t) {
        e(t)
      }))
    }, window.getZLDJStr = function(e, t) {
      var o = 128;
      return o += 1 == e ? parseInt(127 * t / 100) : -parseInt(127 * t / 100), console.log("速度--" + o), o = o.toString(16), o += "", console.log("速度--" + o), o.length < 2 && (o = "0" + o), ["0xf0", "0x" + o]
    }, window.getSFDJStr = function(e, t, o, n, i) {
      var a = [];
      a.push(parseInt(e)
        .toString(16)), a.push(parseInt(o)
        .toString(16)), 1 == t ? a.push(parseInt(128 + parseInt(n) / 100 * 127)
        .toString(16)) : a.push(parseInt(128 - parseInt(n) / 100 * 128)
        .toString(16));
      var r = parseInt(i)
        .toString(16);
      if (r.length < 4) {
        for (var l = "", s = 0; s < 4 - r.length; s++) l += "0";
        r = l + r
      }
      a.push(r.slice(0, 2)), a.push(r.slice(2, 4)), a.push("00");
      var E = "";
      return a.map((function(e, t) {
        var o = e;
        e.length < 2 && (o = "0" + e), E += "0x" + o + ","
      })), E = E.substring(0, E.length - 1), console.log(E), E
    }, window.getDJStr = function(e) {
      var t = ["0", "0", "0", "0", "0", "0", "0"],
        o = 120 + Number(e),
        n = 0;
      if ((n = o.toString(2))
        .length < 9) {
        for (var i = 9 - n.length, a = "", r = 0; r < i; r++) a += "0";
        n = a += n
      }
      console.log(e, "angle---"), console.log(o, "zhNum---"), console.log(n, "newNum---"), t.push(n[0]);
      var l = [];
      n.split("")
        .map((function(e, t) {
          0 != t && l.push(e)
        }));
      var s = parseInt(t.join(""), 2)
        .toString(16),
        E = parseInt(l.join(""), 2)
        .toString(16);
      return s.length < 2 && (s = "0" + s), E.length < 2 && (E = "0" + E), s = "0x" + s, E = "0x" + E, console.log([s, E], "-----"), [s, E]
    }, window.hexCharCodeToStr = function(e) {
      var t, o = e.trim(),
        n = "0x" === o.substr(0, 2)
        .toLowerCase() ? o.substr(2) : o,
        i = n.length;
      if (i % 2 != 0) return alert("Illegal Format ASCII Code!"), "";
      for (var a = [], r = 0; r < i; r += 2) t = parseInt(n.substr(r, 2), 16), a.push(String.fromCharCode(t));
      return a.join("")
    };
    var keepOnlyBlock = function(e) {
        var t = e.type,
          o = 0,
          n = null;
        return e.workspace && e.workspace.topBlocks_.map((function(e) {
          e.type == t && e.rendered && (o += 1, n = e)
        })), o > 1 && (n.dispose(), _message2.default.error("" + _LANGUAGE2.default.TEXT_MSG9[lang])), !1
      },
      bindMousedownWithOpenModal = function(e) {
        _javascript_compressed2.default.bindEventWithChecks_(e.svgGroup_, "mousedown", null, (function(e) {
          window.shouldOpenModal = !0
        }))
      },
      retrunPromiseAndStopStr = function(e) {
        return 'if(!window.funcShouldRun){\nthrow "break func !"\n}else{\nreturn new Promise(async function(resolve, reject){ \nconsole.log("nextFunc--\x3e>")\n' + (e || "resolve()") + "\n})\n};"
      };
    window.allParamsReadlyRunCallBack = function() {
      var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
        t = arguments[1],
        o = !0;
      e.map((function(e) {
        "waitCallback" == e && (o = !1)
      })), o ? t() : (allParamsReadlyRunCallBack, setTimeout(allParamsReadlyRunCallBack(e, t), 100))
    };
    var promiseRun = function(e) {
        var t = e.replace(/\/\//g, "")
          .replace(/\;/g, "")
          .trim()
          .split("\n")
          .filter((function(e) {
            return 0 != e.indexOf(",")
          })),
          o = null;
        return t.map((function(e, t) {
          o = 0 == t ? "" + e : o + ".then(function(result){return window." + e + "}).catch(function(reason){console.log('失败：'+reason)})"
        })), 1 == t.length && (o = "" + o), o
      },
      getInitFunc = function(e, t, o) {
        var n = e && "''" != e ? '"' + e.replace(/\/\//g, "") + '"' : '""';
        var i = "block_" + t.id.replace(/[\ |\~|\`|\!|\@|\#|\$|\%|\^|\&|\*|\(|\)|\-|\_|\+|\=|\||\\|\[|\]|\{|\}|\;|\:|\"|\'|\,|\<|\.|\>|\/|\?]/g, "_");
        return window.funcList[i] || (window.funcList[i] = {}), window.funcList[i][o] = function() {
          return n
        }, "window.funcList." + i + "." + o
      },
      bindFieldClickModal = function(e) {
        var t = e.block,
          o = e.fieldName,
          n = e.modalType,
          i = e.callback,
          a = void 0 === i ? null : i;
        t.getField(o)
          .fieldGroup_ && _javascript_compressed2.default.bindEventWithChecks_(t.getField(o)
            .fieldGroup_, "mouseup", null, (function(e) {
              (0, _openModal.openModal)({
                event: e,
                block: t,
                fieldName: o,
                callback: a,
                type: n
              })
            }))
      },
      bindInputClickModal = function(e) {
        var t = e.block,
          o = e.inputName,
          n = e.fieldName,
          i = e.modalType,
          a = e.callback,
          r = void 0 === a ? null : a,
          l = t.getInput(o)
          .connection.targetConnection && t.getInput(o)
          .connection.targetConnection.sourceBlock_;
        l && _javascript_compressed2.default.utils.addClass(l.svgGroup_, "blocklyEditableText"),  l && l.childBlocks_.length > 0 || l && l.type && "text" != l.type && "colour_picker" != l.type || t.getChildren()
          .length > 0 && _javascript_compressed2.default.bindEventWithChecks_(l.svgGroup_, "mouseup", null, (function(e) {
             (0, _openModal.openModal)({
              event: e,
              block: t,
              fieldName: n,
              callback: r,
              setValueFns: {
                setValueFn: function(e) {
                  //console.log("changeObj", l), console.log("setFieldValue", l.setFieldValue), console.log("1111", n), console.log("block", t), console.log("222", l.getField(n)), 
                  return l.setFieldValue(e, n)
                },
                getValueFn: function() {
                  return l.getFieldValue(n)
                }
              },
              type: i
            })
          }))
      };
    window.getNumVal = function(e) {
      return e
    };
    var getInputVal = function(e, t) {
        var o = (_javascript_compressed2.default.JavaScript.valueToCode(e, t, _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL) || "''")
          .replace(/\/\//g, ""),
          n = "block_" + e.id.replace(/[\ |\~|\`|\!|\@|\#|\$|\%|\^|\&|\*|\(|\)|\-|\_|\+|\=|\||\\|\[|\]|\{|\}|\;|\:|\"|\'|\,|\<|\.|\>|\/|\?]/g, "_");
        return "'" == o[0] ? getInputFunObj["" + n + t] = getNumVal(o) : getInputFunObj["" + n + t] = o, "'" + n + t + "'"
      },
      setWhiteText = function(e) {
        _javascript_compressed2.default.utils.addClass(e.svgGroup_, "masterBeWhite")
      },
      colors = {
        event: {
          colour: "#F5C500",
          colourSecondary: "#ffdd27",
          colourTertiary: "#cca403"
        },
        sport: {
          colour: "#00ADEF",
          colourSecondary: "#1ec1ff",
          colourTertiary: "#4991c7"
        },
        control: {
          colour: "#0095F1",
          colourSecondary: "#0095F1",
          colourTertiary: "#3d70af"
        },
        sensor: {
          colour: "#8869E9",
          colourSecondary: "#533f90",
          colourTertiary: "#533f90"
        },
        operator: {
          colour: "#FF5A5A",
          colourSecondary: "#FF5A5A",
          colourTertiary: "#d44343"
        },
        variable: {
          colour: "#00B94C",
          colourSecondary: "#00B94C",
          colourTertiary: "#0b843d"
        },
        variableOwn: {
          colour: "#00B94C",
          colourSecondary: "#0b843d",
          colourTertiary: "#0b843d"
        }
      };
  
    function customContextMenuFn(e) {
      varoption = {
        enabled: !0,
        text: "Custom option",
        callback: function() {}.bind(this)
      }, e.push(option)
    }
    _javascript_compressed2.default.Blocks.event_whenflagclicked = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "event_whenflagclicked",
          message0: _LANGUAGE2.default.TEXT_WZD[lang] + "%1" + _LANGUAGE2.default.TEXT_BDJ[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "icons/event_whenflagclicked.svg",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          inputsInline: !0,
          nextStatement: null
        }, colors.event)), this.setEditable(!1), this.setMovable(!1), this.setDeletable(!1), this.setDisabled(!1), this.onchange = function(t) {
          "endDrag" == t.type && keepOnlyBlock(e)
        }, this.rendered && (window.playBlockId = this.id, console.log(playBlockId, "playBlockIdplayBlockIdplayBlockId"))
      }
    }, _javascript_compressed2.default.JavaScript.event_whenflagclicked = function(e) {
      _javascript_compressed2.default.JavaScript.valueToCode(e, "VALUE", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL);
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("event_whenflagclicked", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function () {", ' if(!window.funcShouldRun){return "" }', '  console.log("playBtn按下");', retrunPromiseAndStopStr(), "};"]) + "();\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.motor_stop = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "motor_stop",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_DJ[lang] + "%1" + _LANGUAGE2.default.TEXT_TZXZ[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/sigle_motor.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), e.getField("INTERFACE_OPTION")
            .fieldGroup_ && _javascript_compressed2.default.bindEventWithChecks_(e.getField("INTERFACE_OPTION")
              .fieldGroup_, "mouseup", null, (function(t) {
                (0, _openModal.openModal)({
                  event: t,
                  block: e,
                  fieldName: "INTERFACE_OPTION",
                  callback: {
                    okFn: function(e) {
                      //console.log(e)
                    }
                  },
                  type: "CHOOSE_PORT"
                })
              })))
        }
      }
    }, _javascript_compressed2.default.JavaScript.motor_stop = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("motor_stop", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0) {", 'console.log("蓝牙操作-接口"+ argument0 +"电机停止旋转")', retrunPromiseAndStopStr("\nvar num = 128;\nvar motorConfig = {};\nmotorConfig[argument0]=window.getZLDJStr(1,0)\nwindow.setMotorConfigWithBlue(motorConfig,resolve)\n"), "  //dosoming", "};"]) + "(" + t + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.motor_run = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "motor_run",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_DJ[lang] + "%1%2" + _LANGUAGE2.default.TEXT_SDW[lang] + "%3",
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/sigle_motor.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "DIRECTION_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_ZZ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_FZ[lang], "2"]
            ]
          }, {
            type: "input_value",
            name: "SPEED_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "0"],
              ["" + _LANGUAGE2.default.TEXT_SDMS[lang], "25"],
              ["" + _LANGUAGE2.default.TEXT_SDZS[lang], "50"],
              ["" + _LANGUAGE2.default.TEXT_SDKS[lang], "75"],
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "100"]
            ]
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION",
            modalType: "CHOOSE_MOTOT_DIRECTION",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "SPEED_OPTION",
            fieldName: "TEXT",
            modalType: "CHOOSE_SPEED",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.motor_run = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION"),
        o = e.getFieldValue("DIRECTION_OPTION"),
        n = getInputVal(e, "SPEED_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("motor_run", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument0,argument1,argument2) {", "  // Return the last element of a list.", 'console.log("蓝牙操作-接口"+argument0+"电机转向"+argument1+"速度"+argument2+"运转")\n\n', "  //dosoming", retrunPromiseAndStopStr("\nvar motorConfig = {};\nvar val = await eval(getInputFunObj[argument2])\n\nmotorConfig[argument0]=window.getZLDJStr(argument1,val)\nwindow.setMotorConfigWithBlue(motorConfig,resolve)\n"), "};"]) + "(" + t + "," + o + "," + n + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.motor_run_time = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "motor_run_time",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_DJ[lang] + "%1%2" + _LANGUAGE2.default.TEXT_SDW[lang] + "%3" + _LANGUAGE2.default.TEXT_YX[lang] + "%4" + _LANGUAGE2.default.TEXT_M[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/sigle_motor.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "DIRECTION_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_ZZ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_FZ[lang], "2"]
            ]
          }, {
            type: "input_value",
            name: "SPEED_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "0"],
              ["" + _LANGUAGE2.default.TEXT_SDMS[lang], "25"],
              ["" + _LANGUAGE2.default.TEXT_SDZS[lang], "50"],
              ["" + _LANGUAGE2.default.TEXT_SDKS[lang], "75"],
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "100"]
            ]
          }, {
            type: "input_value",
            name: "TIME_INPUT",
            text: "1"
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION",
            modalType: "CHOOSE_MOTOT_DIRECTION",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "SPEED_OPTION",
            fieldName: "TEXT",
            modalType: "CHOOSE_SPEED",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "TIME_INPUT",
            fieldName: "TEXT",
            modalType: "CHOOSE_TIME",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.motor_run_time = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION"),
        o = e.getFieldValue("DIRECTION_OPTION"),
        n = getInputVal(e, "SPEED_OPTION"),
        i = getInputVal(e, "TIME_INPUT");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("motor_run_time", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument0,argument1,argument2,argument3) {", "  // Return the last element of a list.", 'console.log("蓝牙操作-接口"+argument0+"电机转向"+argument1+"速度"+argument2+"运转"+argument3+"秒")', "  //dosoming", retrunPromiseAndStopStr('\nvar val1 = await eval(getInputFunObj[argument2])\nvar val2 = await eval(getInputFunObj[argument3])\n\nvar motorConfig = {};\nmotorConfig[argument0]=window.getZLDJStr(argument1,val1)\nwindow.setMotorConfigWithBlue(motorConfig,function(){})\n\n\nconsole.log(val2+"秒后调用蓝牙停止")\nwindow.setTimeouts[\'' + e.id + '\'] = setTimeout(function(){\nvar motorConfigLater = {};\nmotorConfigLater[argument0]=window.getZLDJStr(argument1,0)\nwindow.setMotorConfigWithBlue(motorConfigLater,resolve);\nconsole.log("停止")\n}, val2*1000);\n'), "};"]) + "(" + t + "," + o + "," + n + "," + i + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.motor_run_angle = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "motor_run_angle",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_SFDJ[lang] + "%1%2" + _LANGUAGE2.default.TEXT_SDW[lang] + "%3" + _LANGUAGE2.default.TEXT_YX[lang] + "%4" + _LANGUAGE2.default.TEXT_D[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/sigle_motor.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "DIRECTION_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_ZZ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_FZ[lang], "2"]
            ]
          }, {
            type: "input_value",
            name: "SPEED_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "0"],
              ["" + _LANGUAGE2.default.TEXT_SDMS[lang], "25"],
              ["" + _LANGUAGE2.default.TEXT_SDZS[lang], "50"],
              ["" + _LANGUAGE2.default.TEXT_SDKS[lang], "75"],
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "100"]
            ]
          }, {
            type: "input_value",
            name: "ANGLE_INPUT",
            text: "1"
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION",
            modalType: "CHOOSE_MOTOT_DIRECTION",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "SPEED_OPTION",
            fieldName: "TEXT",
            modalType: "CHOOSE_SPEED",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "ANGLE_INPUT",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD_65535",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.motor_run_angle = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION"),
        o = e.getFieldValue("DIRECTION_OPTION"),
        n = getInputVal(e, "SPEED_OPTION"),
        i = getInputVal(e, "ANGLE_INPUT");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("motor_run_angle", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0,argument1,argument2,argument3) {", retrunPromiseAndStopStr('\nvar val1 = await eval(getInputFunObj[argument2])\nvar val2 = await eval(getInputFunObj[argument3])\nconsole.log("蓝牙操作-接口"+argument0+"电机转向"+argument1+"速度"+val1+"运行"+val2+"度")\n\nsfMotorConfig[0]=window.getSFDJStr(argument0,argument1,0,val1,val2)\nwindow.setSFMotorConfigWithBlue(resolve)\n'), "};"]) + "(" + t + "," + o + "," + n + "," + i + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.two_motor_run = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "two_motor_run",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_SDJ[lang] + "-" + _LANGUAGE2.default.TEXT_JK[lang] + "AB%1" + _LANGUAGE2.default.TEXT_SDW[lang] + "%2",
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/double_motor.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "DIRECTION_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_QJ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_YZFXX[lang], "2"],
              ["" + _LANGUAGE2.default.TEXT_HT[lang], "3"],
              ["" + _LANGUAGE2.default.TEXT_ZZFXX[lang], "4"]
            ]
          }, {
            type: "input_value",
            name: "SPEED_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "0"],
              ["" + _LANGUAGE2.default.TEXT_SDMS[lang], "25"],
              ["" + _LANGUAGE2.default.TEXT_SDZS[lang], "50"],
              ["" + _LANGUAGE2.default.TEXT_SDKS[lang], "75"],
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "100"]
            ]
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION",
            modalType: "CHOOSE_DIRECTION",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "SPEED_OPTION",
            fieldName: "TEXT",
            modalType: "CHOOSE_SPEED",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.two_motor_run = function(e) {
      var t = e.getFieldValue("DIRECTION_OPTION"),
        o = getInputVal(e, "SPEED_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("two_motor_run", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0,argument1) {", "  // Return the last element of a list.", 'console.log("蓝牙操作-接口AB电机方向"+argument0+"速度"+argument1+"运转")', "  //dosoming", retrunPromiseAndStopStr("\nvar motorConfig = {};\nvar val1 = await eval(getInputFunObj[argument1])\n\nswitch (Number(argument0)) {\ncase 1:\n//前进\nmotorConfig[1]=window.getZLDJStr(1,val1)\nmotorConfig[2]=window.getZLDJStr(1,val1)\nbreak;\ncase 2:\n//右拐\nmotorConfig[1]=window.getZLDJStr(1,val1)\nmotorConfig[2]=window.getZLDJStr(2,val1)\nbreak;\ncase 3:\n//后退\nmotorConfig[1]=window.getZLDJStr(2,val1)\nmotorConfig[2]=window.getZLDJStr(2,val1)\nbreak;\ncase 4:\n//左拐\nmotorConfig[1]=window.getZLDJStr(2,val1)\nmotorConfig[2]=window.getZLDJStr(1,val1)\nbreak;\n\ndefault:\nbreak;\n}\n\nwindow.setMotorConfigWithBlue(motorConfig,resolve)\n"), "};"]) + "(" + t + "," + o + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.two_motor_run_time = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "two_motor_run_time",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_SDJ[lang] + "-" + _LANGUAGE2.default.TEXT_JK[lang] + "AB%1" + _LANGUAGE2.default.TEXT_SDW[lang] + "%2" + _LANGUAGE2.default.TEXT_YX[lang] + "%3" + _LANGUAGE2.default.TEXT_M[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/double_motor.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "DIRECTION_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_QJ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_YZFXX[lang], "2"],
              ["" + _LANGUAGE2.default.TEXT_HT[lang], "3"],
              ["" + _LANGUAGE2.default.TEXT_ZZFXX[lang], "4"]
            ]
          }, {
            type: "input_value",
            name: "SPEED_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "0"],
              ["" + _LANGUAGE2.default.TEXT_SDMS[lang], "25"],
              ["" + _LANGUAGE2.default.TEXT_SDZS[lang], "50"],
              ["" + _LANGUAGE2.default.TEXT_SDKS[lang], "75"],
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "100"]
            ]
          }, {
            type: "input_value",
            name: "TIME_INPUT",
            text: "1"
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION",
            modalType: "CHOOSE_DIRECTION",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "SPEED_OPTION",
            fieldName: "TEXT",
            modalType: "CHOOSE_SPEED",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "TIME_INPUT",
            fieldName: "TEXT",
            modalType: "CHOOSE_TIME",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.two_motor_run_time = function(e) {
      var t = e.getFieldValue("DIRECTION_OPTION"),
        o = getInputVal(e, "SPEED_OPTION"),
        n = getInputVal(e, "TIME_INPUT");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("two_motor_run_time", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0,argument1,argument2) {", "  // Return the last element of a list.", 'console.log("蓝牙操作-接口AB电机方向"+argument0+"速度"+argument1+"运转"+argument2+"秒")', "  //dosoming", retrunPromiseAndStopStr('\nvar motorConfig = {};\nvar val1 = await eval(getInputFunObj[argument1])\nvar val2 = await eval(getInputFunObj[argument2])\nswitch (Number(argument0)) {\ncase 1:\n//前进\nmotorConfig[1]=window.getZLDJStr(1,val1)\nmotorConfig[2]=window.getZLDJStr(1,val1)\nbreak;\ncase 2:\n//右拐\nmotorConfig[1]=window.getZLDJStr(1,val1)\nmotorConfig[2]=window.getZLDJStr(2,val1)\nbreak;\ncase 3:\n//后退\nmotorConfig[1]=window.getZLDJStr(2,val1)\nmotorConfig[2]=window.getZLDJStr(2,val1)\nbreak;\ncase 4:\n//左拐\nmotorConfig[1]=window.getZLDJStr(2,val1)\nmotorConfig[2]=window.getZLDJStr(1,val1)\nbreak;\n\ndefault:\nbreak;\n}\n\nwindow.setMotorConfigWithBlue(motorConfig,function(){})\nconsole.log(val2+"秒后停止");\nwindow.setTimeouts[\'' + e.id + '\'] = setTimeout(function(){\nconsole.log("停止");\nmotorConfig[1]=window.getZLDJStr(1,0)\nmotorConfig[2]=window.getZLDJStr(1,0)\nwindow.setMotorConfigWithBlue(motorConfig,resolve)\nresolve();}, val2*1000);\n'), "};"]) + "(" + t + "," + o + "," + n + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.two_motor_run_angle = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "two_motor_run_angle",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_SSFDJ[lang] + "-" + _LANGUAGE2.default.TEXT_JK[lang] + "AB%1" + _LANGUAGE2.default.TEXT_SDW[lang] + "%2" + _LANGUAGE2.default.TEXT_YX[lang] + "%3" + _LANGUAGE2.default.TEXT_D[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/double_motor.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "DIRECTION_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_QJ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_YZFXX[lang], "2"],
              ["" + _LANGUAGE2.default.TEXT_HT[lang], "3"],
              ["" + _LANGUAGE2.default.TEXT_ZZFXX[lang], "4"]
            ]
          }, {
            type: "input_value",
            name: "SPEED_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "0"],
              ["" + _LANGUAGE2.default.TEXT_SDMS[lang], "25"],
              ["" + _LANGUAGE2.default.TEXT_SDZS[lang], "50"],
              ["" + _LANGUAGE2.default.TEXT_SDKS[lang], "75"],
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "100"]
            ]
          }, {
            type: "input_value",
            name: "ANGLE_INPUT",
            text: "1"
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION",
            modalType: "CHOOSE_DIRECTION",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "SPEED_OPTION",
            fieldName: "TEXT",
            modalType: "CHOOSE_SPEED",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "ANGLE_INPUT",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD_65535",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.two_motor_run_angle = function(e) {
      var t = e.getFieldValue("DIRECTION_OPTION"),
        o = getInputVal(e, "SPEED_OPTION"),
        n = getInputVal(e, "ANGLE_INPUT");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("two_motor_run_angle", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0,argument1,argument2) {", "  // Return the last element of a list.", 'console.log("蓝牙操作-接口AB电机方向"+argument0+"速度"+argument1+"运转"+argument2+"度")', "  //dosoming", retrunPromiseAndStopStr("\nvar val1 = await eval(getInputFunObj[argument1])\nvar val2 = await eval(getInputFunObj[argument2])\nswitch (Number(argument0)) {\ncase 1:\n//前进\nsfMotorConfig[0]=window.getSFDJStr(1,1,0,val1,val2)\nsfMotorConfig[1]=window.getSFDJStr(2,1,0,val1,val2)\nbreak;\ncase 2:\n//右拐\nsfMotorConfig[0]=window.getSFDJStr(1,1,0,val1,val2)\nsfMotorConfig[1]=window.getSFDJStr(2,2,0,val1,val2)\nbreak;\ncase 3:\n//后退\nsfMotorConfig[0]=window.getSFDJStr(1,2,0,val1,val2)\nsfMotorConfig[1]=window.getSFDJStr(2,2,0,val1,val2)\nbreak;\ncase 4:\n//左拐\nsfMotorConfig[0]=window.getSFDJStr(1,2,0,val1,val2)\nsfMotorConfig[1]=window.getSFDJStr(2,1,0,val1,val2)\nbreak;\n\ndefault:\nbreak;\n}\nwindow.setSFMotorConfigWithBlue(resolve)\n"), "};"]) + "(" + t + "," + o + "," + n + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.two_motor_run_s = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "two_motor_run_s",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_SDJ[lang] + "%4%1%5%2" + _LANGUAGE2.default.TEXT_SDW[lang] + "%3",
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/double_motor.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "DIRECTION_OPTION1",
            options: [
              ["" + _LANGUAGE2.default.TEXT_ZZ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_FZ[lang], "2"]
            ]
          }, {
            type: "field_dropdown",
            name: "DIRECTION_OPTION2",
            options: [
              ["" + _LANGUAGE2.default.TEXT_ZZ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_FZ[lang], "2"]
            ]
          }, {
            type: "input_value",
            name: "SPEED_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "0"],
              ["" + _LANGUAGE2.default.TEXT_SDMS[lang], "25"],
              ["" + _LANGUAGE2.default.TEXT_SDZS[lang], "50"],
              ["" + _LANGUAGE2.default.TEXT_SDKS[lang], "75"],
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "100"]
            ]
          }, {
            type: "field_dropdown",
            name: "INTERFACE_OPTION1",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "INTERFACE_OPTION2",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION1",
            modalType: "CHOOSE_MOTOT_DIRECTION",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION2",
            modalType: "CHOOSE_MOTOT_DIRECTION",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "SPEED_OPTION",
            fieldName: "TEXT",
            modalType: "CHOOSE_SPEED",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION1",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION2",
            modalType: "CHOOSE_PORT",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.two_motor_run_s = function(e) {
      var t = e.getFieldValue("DIRECTION_OPTION1"),
        o = e.getFieldValue("DIRECTION_OPTION2"),
        n = getInputVal(e, "SPEED_OPTION"),
        i = e.getFieldValue("INTERFACE_OPTION1"),
        a = e.getFieldValue("INTERFACE_OPTION2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("two_motor_run_s", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0,argument1,argument2,argument3,argument4) {", "  // Return the last element of a list.", 'console.log("蓝牙操作-接口"+argument3+"电机方向"+argument0+"接口"+argument4+"电机方向"+argument1+"速度"+argument2+"运转")', "  //dosoming", retrunPromiseAndStopStr("\n\nvar motorConfig = {};\nvar val1 = await eval(getInputFunObj[argument2])\n\nmotorConfig[argument3]=window.getZLDJStr(argument0,val1)\nmotorConfig[argument4]=window.getZLDJStr(argument1,val1)\n\nwindow.setMotorConfigWithBlue(motorConfig,resolve)\n"), "};"]) + "(" + t + "," + o + "," + n + "," + i + "," + a + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.two_motor_run_time_s = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "two_motor_run_time_s",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_SDJ[lang] + "%5%1%6%2" + _LANGUAGE2.default.TEXT_SDW[lang] + "%3" + _LANGUAGE2.default.TEXT_YX[lang] + "%4" + _LANGUAGE2.default.TEXT_M[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/double_motor.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "DIRECTION_OPTION1",
            options: [
              ["" + _LANGUAGE2.default.TEXT_ZZ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_FZ[lang], "2"]
            ]
          }, {
            type: "field_dropdown",
            name: "DIRECTION_OPTION2",
            options: [
              ["" + _LANGUAGE2.default.TEXT_ZZ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_FZ[lang], "2"]
            ]
          }, {
            type: "input_value",
            name: "SPEED_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "0"],
              ["" + _LANGUAGE2.default.TEXT_SDMS[lang], "25"],
              ["" + _LANGUAGE2.default.TEXT_SDZS[lang], "50"],
              ["" + _LANGUAGE2.default.TEXT_SDKS[lang], "75"],
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "100"]
            ]
          }, {
            type: "input_value",
            name: "TIME_INPUT",
            text: "1"
          }, {
            type: "field_dropdown",
            name: "INTERFACE_OPTION1",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "INTERFACE_OPTION2",
            value: "2",
            text: "2",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION1",
            modalType: "CHOOSE_MOTOT_DIRECTION",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION2",
            modalType: "CHOOSE_MOTOT_DIRECTION",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "SPEED_OPTION",
            fieldName: "TEXT",
            modalType: "CHOOSE_SPEED",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "TIME_INPUT",
            fieldName: "TEXT",
            modalType: "CHOOSE_TIME",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION1",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION2",
            modalType: "CHOOSE_PORT",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.two_motor_run_time_s = function(e) {
      var t = e.getFieldValue("DIRECTION_OPTION1"),
        o = e.getFieldValue("DIRECTION_OPTION2"),
        n = getInputVal(e, "SPEED_OPTION"),
        i = getInputVal(e, "TIME_INPUT"),
        a = e.getFieldValue("INTERFACE_OPTION1"),
        r = e.getFieldValue("INTERFACE_OPTION2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("two_motor_run_time_s", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0,argument1,argument2,argument3,argument4,argument5) {", "  // Return the last element of a list.", 'console.log("蓝牙操作-接口"+argument4+"电机方向"+argument0+"接口"+argument5+"电机方向"+argument1+"速度"+argument2+"运转"+argument3+"秒")', "  //dosoming", retrunPromiseAndStopStr("\n\nvar motorConfig = {};\nvar val1 = await eval(getInputFunObj[argument2])\nvar val2 = await eval(getInputFunObj[argument3])\nmotorConfig[argument4]=window.getZLDJStr(argument0,val1)\nmotorConfig[argument5]=window.getZLDJStr(argument1,val1)\nwindow.setMotorConfigWithBlue(motorConfig,function(){})\n\nwindow.setTimeouts['" + e.id + '\'] = setTimeout(function(){\nconsole.log("停止");\nmotorConfig[argument4]=window.getZLDJStr(argument0,0)\nmotorConfig[argument5]=window.getZLDJStr(argument1,0)\nwindow.setMotorConfigWithBlue(motorConfig,resolve)\n}, val2*1000);\n'), "};"]) + "(" + t + "," + o + "," + n + "," + i + "," + a + "," + r + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.two_motor_run_angle_s = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "two_motor_run_angle_s",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_SSFDJ[lang] + "%5%1%6%2" + _LANGUAGE2.default.TEXT_SDW[lang] + "%3" + _LANGUAGE2.default.TEXT_YX[lang] + "%4" + _LANGUAGE2.default.TEXT_D[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/double_motor.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "DIRECTION_OPTION1",
            options: [
              ["" + _LANGUAGE2.default.TEXT_ZZ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_FZ[lang], "2"]
            ]
          }, {
            type: "field_dropdown",
            name: "DIRECTION_OPTION2",
            options: [
              ["" + _LANGUAGE2.default.TEXT_ZZ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_FZ[lang], "2"]
            ]
          }, {
            type: "input_value",
            name: "SPEED_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "0"],
              ["" + _LANGUAGE2.default.TEXT_SDMS[lang], "25"],
              ["" + _LANGUAGE2.default.TEXT_SDZS[lang], "50"],
              ["" + _LANGUAGE2.default.TEXT_SDKS[lang], "75"],
              ["" + _LANGUAGE2.default.TEXT_SDFCK[lang], "100"]
            ]
          }, {
            type: "input_value",
            name: "ANGLE_INPUT",
            text: "1"
          }, {
            type: "field_dropdown",
            name: "INTERFACE_OPTION1",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "INTERFACE_OPTION2",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION1",
            modalType: "CHOOSE_MOTOT_DIRECTION",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_OPTION2",
            modalType: "CHOOSE_MOTOT_DIRECTION",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "SPEED_OPTION",
            fieldName: "TEXT",
            modalType: "CHOOSE_SPEED",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "ANGLE_INPUT",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD_65535",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION1",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION2",
            modalType: "CHOOSE_PORT",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.two_motor_run_angle_s = function(e) {
      var t = e.getFieldValue("DIRECTION_OPTION1"),
        o = e.getFieldValue("DIRECTION_OPTION2"),
        n = getInputVal(e, "SPEED_OPTION"),
        i = getInputVal(e, "ANGLE_INPUT"),
        a = e.getFieldValue("INTERFACE_OPTION1"),
        r = e.getFieldValue("INTERFACE_OPTION2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("two_motor_run_angle_s", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0,argument1,argument2,argument3,argument4,argument5) {", "  // Return the last element of a list.", 'console.log("蓝牙操作-接口"+argument4+"电机方向"+argument0+"接口"+argument5+"电机方向"+argument1+"速度"+argument2+"运转"+argument3+"度")', "  //dosoming", retrunPromiseAndStopStr("\nvar val1 = await eval(getInputFunObj[argument2])\nvar val2 = await eval(getInputFunObj[argument3])\nsfMotorConfig[0]=window.getSFDJStr(argument4,argument0,0,val1,val2)\nsfMotorConfig[1]=window.getSFDJStr(argument5,argument1,0,val1,val2)\nwindow.setSFMotorConfigWithBlue(resolve)\n"), "};"]) + "(" + t + "," + o + "," + n + "," + i + "," + a + "," + r + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.two_motor_stop = {
      customContextMenu: customContextMenuFn,
      init: function() {
        this.jsonInit((0, _extends3.default)({
          id: "two_motor_stop",
          message0: "%1" + _LANGUAGE2.default.TEXT_SDJ[lang] + _LANGUAGE2.default.TEXT_TZYD[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/double_motor.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport))
      }
    }, _javascript_compressed2.default.JavaScript.two_motor_stop = function(e) {
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("two_motor_stop", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function () {", "  // Return the last element of a list.", 'console.log("蓝牙操作-双电机停止运转")', "  //dosoming", retrunPromiseAndStopStr("\nvar motorConfig = {};\nmotorConfig[1]=window.getZLDJStr(1,0)\nmotorConfig[2]=window.getZLDJStr(1,0)\nwindow.setMotorConfigWithBlue(motorConfig,resolve)\n"), "};"]) + "();\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.steer_run_time = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "steer_run_time",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_DJJ[lang] + "%1%2" + _LANGUAGE2.default.TEXT_YX[lang] + "%3" + _LANGUAGE2.default.TEXT_M[lang] + _LANGUAGE2.default.TEXT_HZ[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/舵机.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "DIRECTION_TWO_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_XZFXX[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_XYFXX[lang], "2"]
            ]
          }, {
            type: "input_value",
            name: "TIME_INPUT",
            text: "1"
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "DIRECTION_TWO_OPTION",
            modalType: "CHOOSE_DIRECTION_TWO",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "TIME_INPUT",
            fieldName: "TEXT",
            modalType: "CHOOSE_TIME",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.steer_run_time = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION"),
        o = e.getFieldValue("DIRECTION_TWO_OPTION"),
        n = getInputVal(e, "TIME_INPUT");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("steer_run_time", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0,argument1,argument2) {", "  // Return the last element of a list.", 'console.log("蓝牙操作-接口"+argument0+"舵机方向"+argument1+"运转"+argument2+"秒后回中")', "  //dosoming", retrunPromiseAndStopStr("\nvar motorConfig = {};\nvar num = 0;\nvar val1 = await eval(getInputFunObj[argument2])\n\nif(argument1==1){\nnum = -120\n}else{\nnum = 120\n}\nmotorConfig[argument0]=window.getDJStr(num)\n\nwindow.setMotorConfigWithBlue(motorConfig,function(){})\nwindow.setTimeouts['" + e.id + "'] = setTimeout(\n\nfunction(){\nmotorConfig[argument0]=window.getDJStr(0)\nwindow.setMotorConfigWithBlue(motorConfig,resolve) \n}\n, val1*1000);\n\n"), "};"]) + "(" + t + "," + o + "," + n + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.steer_run_angle = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "steer_run_angle",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_DJJ[lang] + "%1" + _LANGUAGE2.default.TEXT_ZDD[lang] + "%2" + _LANGUAGE2.default.TEXT_D[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/舵机.png",
            width: 40,
            height: 60,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "input_value",
            name: "ANGLE_INPUT",
            text: "1"
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.sport)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "ANGLE_INPUT",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD_ZF_120",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.steer_run_angle = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION"),
        o = getInputVal(e, "ANGLE_INPUT");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("steer_run_angle", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0,argument1) {", "  // Return the last element of a list.", 'console.log("蓝牙操作-接口"+argument0+"舵机转动到"+argument1+"度")', "  //dosoming", retrunPromiseAndStopStr("\nvar motorConfig = {};\nvar val1 = await eval(getInputFunObj[argument1])\n\nmotorConfig[argument0]=window.getDJStr(val1)\nwindow.setMotorConfigWithBlue(motorConfig,resolve)\n"), "};"]) + "(" + t + "," + o + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_csb_val = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "steer_run_angle",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_CSBCGQ[lang] + "%1" + _LANGUAGE2.default.TEXT_JL[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/超声波.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }]
        }, colors.sensor, {
          extensions: ["output_number"]
        })), setWhiteText(this), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_csb_val = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_csb_val", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0) {", 'console.log("返回"+argument0+"端口传感器值")', " //dosoming", '\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x0"+argument0,"0x07","0x00","0x00","0xff"],function(str){\nconsole.log("超声波值为",Number(str))\nresolve(Number(str))\n})\n})\n', "};"]) + "(" + t + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_csb_boolean = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "steer_run_angle",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_CSBCGQ[lang] + "%1" + _LANGUAGE2.default.TEXT_JCD[lang] + "%2%3" + _LANGUAGE2.default.TEXT_LM[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/超声波.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "OPERATOR_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_DYY[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_XYY[lang], "2"],
              ["" + _LANGUAGE2.default.TEXT_DYYY[lang], "3"]
            ]
          }, {
            type: "input_value",
            name: "NUM_INPUT",
            text: "1"
          }]
        }, colors.sensor, {
          extensions: ["output_boolean"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "OPERATOR_OPTION",
            modalType: "CHOOSE_OPERATOR",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "NUM_INPUT",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_csb_boolean = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION"),
        o = e.getFieldValue("OPERATOR_OPTION"),
        n = getInputVal(e, "NUM_INPUT");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_csb_boolean", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " =async function (argument0,argument1,argument2) {", 'console.log("接口"+argument0+"传感器值-比较值"+argument1+"被比较值"+argument2,"----")', '\nvar val = await eval(getInputFunObj[argument2])\nvar bijiao = argument1;\nvar result = false;\n\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x0"+argument0,"0x07","0x00","0x00","0xff"],function(str){\nif(bijiao==1){\nconsole.log("大于比较")\nresult = (Number(str)>Number(val))\n}else if(bijiao==2){\nconsole.log("小于比较")\nresult = (Number(str)<Number(val))\n}else{\nconsole.log("等于比较")\nresult = (Number(str)==Number(val))\n}\nresolve(result)\n})\n})\n', "};"]) + "(" + t + "," + o + "," + n + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_color_boolean = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "steer_run_angle",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_YSCGQ[lang] + "%1" + _LANGUAGE2.default.TEXT_JCD[lang] + "%2",
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/颜色传感器.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "input_value",
            name: "COLOR",
            check: "Colour"
          }]
        }, colors.sensor, {
          extensions: ["output_boolean"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "COLOR",
            fieldName: "COLOUR",
            modalType: "CHOOSE_COLOR",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_color_boolean = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION"),
        o = getInputVal(e, "COLOR");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_color_boolean", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument0,argument1) {", 'console.log("检测"+argument0+"口颜色的值是否为"+argument1+""+"----")', '\nvar val = await eval(getInputFunObj[argument1])\nvar result = false;\n\n\n\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x0"+argument0,"0x06","0x00","0x00","0xff"],function(str){\n//处理颜色\n\nswitch (Number(str)) {\ncase 1:\n//红\nresult = (val == "#B40000")\nbreak;\ncase 2:\n//黄\nresult = (val == "#FAC80A")\nbreak;\ncase 3:\n//绿\nresult = (val == "#58AB41")\nbreak;\ncase 4:\n//蓝\nresult = (val == "#469BC3")\nbreak;\ncase 5:\n//黑\nresult = (val == "#1B2A34")\nbreak;\ncase 6:\n//紫\nresult = (val == "#D3359D")\nbreak;\ncase 7:\n//白\nresult = (val == "#FFFFFF")\nbreak;\ncase 0:\n//识别错误\nresult = (val == "#9c9c9c")\nbreak;\ndefault:\nbreak;\n}\n\nconsole.log("val",val)\nconsole.log("result",result)\nresolve(result)\n})\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_color_val = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "steer_run_angle",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_YSCGQ[lang] + "%1" + _LANGUAGE2.default.TEXT_YSS[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/颜色传感器.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }]
        }, colors.sensor, {
          extensions: ["output_string"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), setWhiteText(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_color_val = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_color_val", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0) {", 'console.log("获取"+argument0+"口颜色的值")', '\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x0"+argument0,"0x06","0x00","0x00","0xff"],function(str){\nresolve(Number(str))\n})\n})\n', "};"]) + "(" + t + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_qx_boolean = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "sensor_qx_boolean",
          message0: "%1",
          message1: "" + _LANGUAGE2.default.TEXT_QXCGQ[lang] + _LANGUAGE2.default.TEXT_JCD[lang] + "%1",
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/陀螺仪.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "STATUS_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_QQQ[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_HQQ[lang], "2"],
              ["" + _LANGUAGE2.default.TEXT_ZQQ[lang], "3"],
              ["" + _LANGUAGE2.default.TEXT_YQQ[lang], "4"],
              ["" + _LANGUAGE2.default.TEXT_PF[lang], "0"]
            ]
          }]
        }, colors.sensor, {
          extensions: ["output_boolean"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "STATUS_OPTION",
            modalType: "TILT_STATUS",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_qx_boolean = function(e) {
      var t = e.getFieldValue("STATUS_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_qx_boolean", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument1) {", 'console.log("检测倾斜值是否为"+argument1+""+"----")', '\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x00","0x05","0x00","0x00","0xff"],function(str){\nconsole.log("比较倾斜值",Number(str),Number(argument1))\nresolve(Number(str)==Number(argument1))\n})\n})\n', "};"]) + "(" + t + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_qx_val = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "sensor_qx_val",
          message0: "%1",
          message1: "" + _LANGUAGE2.default.TEXT_QXCGQ[lang] + _LANGUAGE2.default.TEXT_ZZT[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/陀螺仪.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: []
        }, colors.sensor, {
          extensions: ["output_number"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), setWhiteText(e))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_qx_val = function(e) {
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_qx_val", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function () {", 'console.log("口倾斜值为")', '\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x00","0x05","0x00","0x00","0xff"],function(str){\nconsole.log("倾斜值为",Number(str))\nresolve(Number(str))\n})\n})\n', "};"]) + "()", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_hy_boolean = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "sensor_hy_boolean",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_HWCGQ[lang] + "%1" + _LANGUAGE2.default.TEXT_JCD[lang] + "%2" + _LANGUAGE2.default.TEXT_ZA[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/红外避障.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "STATUS_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_YES[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_NO[lang], "2"]
            ]
          }]
        }, colors.sensor, {
          extensions: ["output_boolean"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "STATUS_OPTION",
            modalType: "CHOOSE_OBSTACLE",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_hy_boolean = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION"),
        o = e.getFieldValue("STATUS_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_hy_boolean", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0,argument1) {", 'console.log("检测"+argument0+"口红外传感是否为"+argument1+""+"----")', '\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x0"+argument0,"0x04","0x00","0x00","0xff"],function(str){\nconsole.log("比较红外值小于0没障碍，大于则有",Number(str))\nvar hasZR = true;\nif(argument1 == 1){\nhasZR = Number(str)>0\n}else{\nhasZR = Number(str)<=0\n}\nresolve(hasZR)\n})\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_hy_val = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "sensor_hy_val",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_HWCGQ[lang] + "%1" + _LANGUAGE2.default.TEXT_Z[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/红外避障.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }]
        }, colors.sensor, {
          extensions: ["output_number"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), setWhiteText(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_hy_val = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_hy_val", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0) {", 'console.log(argument0+"口红外值为")', '\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x0"+argument0,"0x04","0x00","0x00","0xff"],function(str){\nconsole.log("红外值为",Number(str))\nresolve(Number(str))\n})\n})\n', "};"]) + "(" + t + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_hd_qd_boolean = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "sensor_hd_qd_boolean",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_HDCGQ[lang] + "%1" + _LANGUAGE2.default.TEXT_FSGQD[lang] + "%2%3",
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/灰度.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "OPERATOR_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_DYY[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_XYY[lang], "2"],
              ["" + _LANGUAGE2.default.TEXT_DYYY[lang], "3"]
            ]
          }, {
            type: "input_value",
            name: "NUM_INPUT",
            text: "1"
          }]
        }, colors.sensor, {
          extensions: ["output_boolean"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "OPERATOR_OPTION",
            modalType: "CHOOSE_OPERATOR",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "NUM_INPUT",
            fieldName: "TEXT",
            modalType: "CHOOSE_LIGHT",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_hd_qd_boolean = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION"),
        o = e.getFieldValue("OPERATOR_OPTION"),
        n = getInputVal(e, "NUM_INPUT");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_hd_qd_boolean", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " =async function (argument0,argument1,argument2) {", 'console.log("接口"+argument0+"灰度传感器值-比较值"+argument1+"被比较值"+argument2,"----")', '\nvar val = await eval(getInputFunObj[argument2])\nvar bijiao = argument1;\nvar result = false;\n\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x0"+argument0,"0x08","0x00","0x00","0xff"],function(str){\nif(bijiao==1){\nconsole.log("大于比较")\nresult = (Number(str)>Number(val))\n}else if(bijiao==2){\nconsole.log("小于比较")\nresult = (Number(str)<Number(val))\n}else{\nconsole.log("等于比较")\nresult = (Number(str)==Number(val))\n}\nresolve(result)\n})\n})\n', "};"]) + "(" + t + "," + o + "," + n + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_hd_qd_val = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "sensor_hd_qd_val",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_HDCGQ[lang] + "%1" + _LANGUAGE2.default.TEXT_Z[lang],
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/灰度.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }]
        }, colors.sensor, {
          extensions: ["output_number"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), setWhiteText(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_hd_qd_val = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_hd_qd_val", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0) {", 'console.log(argument0+"口灰度值为")', '\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x0"+argument0,"0x08","0x00","0x00","0xff"],function(str){\nconsole.log("灰度值为",Number(str))\nresolve(Number(str))\n})\n})\n', "};"]) + "(" + t + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_hd_line_boolean = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "sensor_hd_line_boolean",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_HDCGQ[lang] + "%1" + _LANGUAGE2.default.TEXT_JCD[lang] + "%2",
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/灰度.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "STATUS_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_HXX[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_BXX[lang], "2"]
            ]
          }]
        }, colors.sensor, {
          extensions: ["output_boolean"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "STATUS_OPTION",
            modalType: "IN_PATH",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_hd_line_boolean = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION"),
        o = e.getFieldValue("STATUS_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_hd_line_boolean", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0,argument1) {", 'console.log("检测"+argument0+"口灰度传感是否为"+argument1+""+"----")', '\nvar result = false;\n\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x0"+argument0,"0x08","0x00","0x00","0xff"],function(str){\nif(argument1==1){\nconsole.log("黑线")\nresult = (Number(str)>=0&&Number(str)<=35)\n}else if(argument1==2){\nconsole.log("白线")\nresult = (Number(str)>=36&&Number(str)<=255)\n}\nresolve(result)\n})\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_hjg_val = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "sensor_hjg_val",
          message0: "环境光%1值",
          args0: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }]
        }, colors.sensor, {
          extensions: ["output_number"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), setWhiteText(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_hjg_val = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_hjg_val", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument0) {", 'console.log(argument0+"口环境光值为")', '\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x0"+argument0,"0x08","0x00","0x00","0xff"],function(str){\nconsole.log("灰度值为",Number(str))\nresolve(Number(str))\n})\n})\n', "};"]) + "(" + t + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.control_wait = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "control_wait",
          message0: _LANGUAGE2.default.TEXT_DDDD[lang] + "%1" + _LANGUAGE2.default.TEXT_M[lang],
          args0: [{
            type: "input_value",
            name: "TIME"
          }],
          extensions: ["shape_statement"]
        }, colors.control)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindInputClickModal({
            block: e,
            inputName: "TIME",
            fieldName: "TEXT",
            modalType: "CHOOSE_TIME",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.control_wait = function(e) {
      var t = getInputVal(e, "TIME");
      return  ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("control_wait", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument0) {", '\nvar val0 = await eval(getInputFunObj[argument0]);\nconsole.log("等待时间>>>>>"+val0)\n', retrunPromiseAndStopStr("\nwindow.setTimeouts['" + e.id + "'] = setTimeout(function(){resolve()}, val0*1000);\n"), "};"]) + "(" + t + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.control_if = {
      customContextMenu: customContextMenuFn,
      init: function() {
        this.jsonInit((0, _extends3.default)({
          type: "control_if",
          message0: _LANGUAGE2.default.TEXT_RGGG[lang] + "%1" + _LANGUAGE2.default.TEXT_NMMM[lang],
          message1: "%1",
          args0: [{
            type: "input_value",
            name: "CONDITION",
            check: "Boolean"
          }],
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }],
          nextStatement: null,
          previousStatement: null,
          extensions: ["shape_statement"]
        }, colors.control))
      }
    }, _javascript_compressed2.default.JavaScript.control_if = function(e) {
      var t = getInputVal(e, "CONDITION"),
        o = promiseRun(_javascript_compressed2.default.JavaScript.valueToCode(e, "SUBSTACK", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL)) || "''";
      return console.log(o, "statement"), o = getInitFunc(o, e, "SUBSTACK"), console.log(t, "argument0"), console.log(o, "statementFunc---"), ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("control_if", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument0,statementFunc) {", "  // Return the last element of a list.", "  statementFunc = statementFunc() ", '\nvar promise = null;\nvar ok = await eval(getInputFunObj[argument0])\nif(argument0&& ok){\nconsole.log("控制函数-control_if-条件通过")\nconsole.log("statementFunc")\nreturn eval(eval(statementFunc));\n}else{\nconsole.log("控制函数-control_if-条件不通过-直接越过")\n' + retrunPromiseAndStopStr() + "\n}\n", "  //dosoming", "};"]) + "(" + t + "," + o + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.control_if_else = {
      customContextMenu: customContextMenuFn,
      init: function() {
        this.jsonInit((0, _extends3.default)({
          type: "control_if_else",
          message0: _LANGUAGE2.default.TEXT_RGGG[lang] + "%1" + _LANGUAGE2.default.TEXT_NMMM[lang],
          message1: "%1",
          message2: "" + _LANGUAGE2.default.TEXT_FZZZ[lang],
          message3: "%1",
          args0: [{
            type: "input_value",
            name: "CONDITION",
            check: "Boolean"
          }],
          args1: [{
            type: "input_statement",
            name: "SUBSTACK1"
          }],
          args3: [{
            type: "input_statement",
            name: "SUBSTACK2"
          }],
          category: _javascript_compressed2.default.Categories.control,
          extensions: ["shape_statement"]
        }, colors.control))
      }
    }, _javascript_compressed2.default.JavaScript.control_if_else = function(e) {
      var t = getInputVal(e, "CONDITION"),
        o = promiseRun(_javascript_compressed2.default.JavaScript.valueToCode(e, "SUBSTACK1", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL)) || "''",
        n = promiseRun(_javascript_compressed2.default.JavaScript.valueToCode(e, "SUBSTACK2", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL)) || "''";
      return console.log(o, "statement"), console.log(n, "statement"), o = getInitFunc(o, e, "SUBSTACK1"), n = getInitFunc(n, e, "SUBSTACK2"), ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("control_if", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument0,statementFunc1,statementFunc2) {", "  // Return the last element of a list.", "  statementFunc1 = statementFunc1() ", "  statementFunc2 = statementFunc2() ", '\nvar promise = null;\nvar ok = await eval(getInputFunObj[argument0])\nconsole.log("okokok",ok)\n\nif(argument0&&ok){\nconsole.log("控制函数-control_if-条件通过")\nconsole.log("statementFunc1")\nreturn eval(eval(statementFunc1));\n}else{\nconsole.log("控制函数-control_if-条件不通过")\nreturn eval(eval(statementFunc2));\n}\n', "  //dosoming", "};"]) + "(" + t + "," + o + "," + n + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.control_repeat = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          type: "control_repeat",
          message0: _LANGUAGE2.default.TEXT_CFZX[lang] + " %1" + _LANGUAGE2.default.TEXT_C[lang],
          message1: "%1",
          args0: [{
            type: "input_value",
            name: "TIME"
          }],
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }]
        }, colors.control, {
          nextStatement: null,
          previousStatement: null
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindInputClickModal({
            block: e,
            inputName: "TIME",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.control_repeat = function(e) {
      var t = getInputVal(e, "TIME"),
        o = promiseRun(_javascript_compressed2.default.JavaScript.valueToCode(e, "SUBSTACK", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL)) || "''";
      return o = getInitFunc(o, e, "SUBSTACK"), ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("control_repeat", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument0,statementFunc) {", "  // Return the last element of a list.", "  statementFunc = statementFunc() ", '\n\nvar runNum = await eval(getInputFunObj[argument0])\nconsole.log(runNum,"runNum")\n\nvar promise = null;\nfor(var i=0;i<Number(runNum);i++){ \nconsole.log(i,"重复执行")\nif(i==(Number(runNum)-1)&&i!=0){\nvar str = eval(statementFunc);\npromise+=".then(()=>{ return "+str+"}).then(()=>{resolve()})";\n}else if(i!=0){\nvar str = eval(statementFunc);\npromise+=".then(()=>{ return "+str+"})";\n}else{\npromise = eval(statementFunc);\n}\n}\nconsole.log(promise,"promise")\n\n' + retrunPromiseAndStopStr(" eval(promise)") + "\n", "  //dosoming", "};"]) + "(" + t + "," + o + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.control_repeat_forever = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          type: "control_repeat_forever",
          message0: "" + _LANGUAGE2.default.TEXT_CFZX[lang],
          message1: "%1",
          args0: [],
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }]
        }, colors.control, {
          inputsInline: !0,
          previousStatement: null
        })), this.onchange = function(t) {
          "create" == t.type && bindMousedownWithOpenModal(e)
        }
      }
    }, _javascript_compressed2.default.JavaScript.control_repeat_forever = function(e) {
      var t = promiseRun(_javascript_compressed2.default.JavaScript.valueToCode(e, "SUBSTACK", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL)) || "''";
      return t = getInitFunc(t, e, "SUBSTACK"), ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("control_repeat_forever", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (statementFunc) {", "  // Return the last element of a list.", "  statementFunc = statementFunc() ", '\nconsole.log("重复执行")\nconsole.log(statementFunc,"statementFunc")\nif(statementFunc==\'""\'){\nconsole.log("重复执行函数不存在")\nreturn ""\n}\n\nreturn new Promise((resolve, reject) => { \nconsole.log("nextFunc--\x3e>")\nvar forever = async function(){\n//递归\n\nconsole.log("控制函数-control_until-条件不通过-延迟100毫秒重新获取条件")\neval(eval(statementFunc)).then(()=>{\nwindow.setTimeouts[\'' + e.id + "'] = setTimeout(() => forever(), 10);\n});\n\n}\nforever()\n})\n\n\n", "  //dosoming", "};"]) + "(" + t + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.control_wait_something = {
      customContextMenu: customContextMenuFn,
      init: function() {
        this.jsonInit((0, _extends3.default)({
          type: "control_wait_something",
          message0: _LANGUAGE2.default.TEXT_DDDD[lang] + "%1",
          args0: [{
            type: "input_value",
            name: "CONDITION",
            check: "Boolean"
          }],
          nextStatement: null,
          previousStatement: null
        }, colors.control))
      }
    }, _javascript_compressed2.default.JavaScript.control_wait_something = function(e) {
      var t = getInputVal(e, "CONDITION");
      return console.log(t, "argument0"), ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("control_wait_something", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument0) {", "  // Return the last element of a list.", '\n\nif(argument0==\'""\'){\nconsole.log("重复执行函数或执行条件不存在")\n' + retrunPromiseAndStopStr() + '\n}\nconsole.log("argument0",argument0)\nconsole.log("argument110",getInputFunObj[argument0])\n\n\nreturn new Promise((resolve, reject) => { \nconsole.log("nextFunc--\x3e>")\nvar forever = async function(){\n//递归\nvar ok = await eval(getInputFunObj[argument0])\n\nconsole.log("进入递归control_wait_something》》"+ok)\nif(!window.funcShouldRun){\nthrow "break func !"\n}else{\nif(argument0&& ok){\n\nconsole.log("控制函数-control_wait-条件通过")\nresolve()\n}else{\nconsole.log("控制函数-control_wait-条件不通过-延迟300毫秒重新获取条件")\n\nwindow.setTimeouts[\'' + e.id + "'] = setTimeout(() => forever(), 300);\n}\n}\n}\nforever()\n})\n\n\n", "  //dosoming", "};"]) + "(" + t + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.control_until_something = {
      customContextMenu: customContextMenuFn,
      init: function() {
        this.jsonInit((0, _extends3.default)({
          type: "control_until_something",
          message0: "" + _LANGUAGE2.default.TEXT_CFZX[lang] + _LANGUAGE2.default.TEXT_ZDDD[lang] + "%1",
          message1: "%1",
          args0: [{
            type: "input_value",
            name: "CONDITION",
            check: "Boolean"
          }],
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }],
          nextStatement: null,
          previousStatement: null,
          extensions: ["shape_statement"]
        }, colors.control))
      }
    }, _javascript_compressed2.default.JavaScript.control_until_something = function(e) {
      var t = getInputVal(e, "CONDITION"),
        o = promiseRun(_javascript_compressed2.default.JavaScript.valueToCode(e, "SUBSTACK", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL)) || "''";
      return console.log(o, "statement"), o = getInitFunc(o, e, "SUBSTACK"), console.log(o, "statement"), ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("control_until_something", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument0,statementFunc) {", "  // Return the last element of a list.", "  statementFunc = statementFunc() ", '\n\nif(statementFunc==\'""\'||argument0==\'""\'){\nconsole.log("重复执行函数或执行条件不存在")\n' + retrunPromiseAndStopStr() + '\n}\n\n\nreturn new Promise((resolve, reject) => { \nconsole.log("nextFunc--\x3e>")\nvar forever = async function(){\n//递归\nvar ok = await eval(getInputFunObj[argument0])\nconsole.log("进入递归control_until_something》》》"+ok)\nconsole.log(eval(statementFunc))\nif(!window.funcShouldRun){\nthrow "break func !"\n}else{\nif(argument0&&ok){\n\nconsole.log("控制函数-control_until-条件通过")\nresolve()\n\n}else{\nconsole.log("控制函数-control_until-条件不通过-延迟100毫秒重新获取条件")\neval(eval(statementFunc)).then(()=>{\nwindow.setTimeouts[\'' + e.id + "'] = setTimeout(() => forever(), 10);\n});\n\n\n}\n}\n}\nforever()\n})\n\n", "  //dosoming", "};"]) + "(" + t + "," + o + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.operator_lt = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          message0: _javascript_compressed2.default.Msg.OPERATORS_LT,
          args0: [{
            type: "input_value",
            name: "OPERAND1"
          }, {
            type: "input_value",
            name: "OPERAND2"
          }],
          extensions: ["output_boolean"]
        }, colors.operator)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindInputClickModal({
            block: e,
            inputName: "OPERAND1",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "OPERAND2",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.operator_lt = function(e) {
      var t = getInputVal(e, "OPERAND1"),
        o = getInputVal(e, "OPERAND2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("operator_lt", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument1,argument2) {", '\nvar argument1_val = await eval(getInputFunObj[argument1]);\nvar argument2_val = await eval(getInputFunObj[argument2]);\n\nconsole.log("小于运算>>>>>"+argument1_val+"<"+argument2_val)\n\nreturn new Promise((resolve, reject)=>{\nresolve(Number(argument1_val)<Number(argument2_val))\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.operator_equals = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          message0: "%1=%2",
          args0: [{
            type: "input_value",
            name: "OPERAND1"
          }, {
            type: "input_value",
            name: "OPERAND2"
          }],
          extensions: ["output_boolean"]
        }, colors.operator)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindInputClickModal({
            block: e,
            inputName: "OPERAND1",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "OPERAND2",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.operator_equals = function(e) {
      var t = getInputVal(e, "OPERAND1"),
        o = getInputVal(e, "OPERAND2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("operator_equals", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument1,argument2) {", '\nvar argument1_val = await eval(getInputFunObj[argument1]);\nvar argument2_val = await eval(getInputFunObj[argument2]);\n\nconsole.log("等于运算>>>>>"+argument1_val+"=="+argument2_val)\n\nreturn new Promise((resolve, reject)=>{\nresolve(Number(argument1_val)==Number(argument2_val))\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.operator_gt = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          message0: "%1>%2",
          args0: [{
            type: "input_value",
            name: "OPERAND1"
          }, {
            type: "input_value",
            name: "OPERAND2"
          }],
          extensions: ["output_boolean"]
        }, colors.operator)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindInputClickModal({
            block: e,
            inputName: "OPERAND1",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "OPERAND2",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.operator_gt = function(e) {
      var t = getInputVal(e, "OPERAND1"),
        o = getInputVal(e, "OPERAND2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("operator_gt", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument1,argument2) {", '\nvar argument1_val = await eval(getInputFunObj[argument1]);\nvar argument2_val = await eval(getInputFunObj[argument2]);\n\nconsole.log("大于运算>>>>>"+argument1_val+">"+argument2_val)\n\nreturn new Promise((resolve, reject)=>{\nresolve(Number(argument1_val)>Number(argument2_val))\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.operator_add = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          message0: "%1+%2",
          args0: [{
            type: "input_value",
            name: "OPERAND1"
          }, {
            type: "input_value",
            name: "OPERAND2"
          }],
          extensions: ["output_number"]
        }, colors.operator)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindInputClickModal({
            block: e,
            inputName: "OPERAND1",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "OPERAND2",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.operator_add = function(e) {
      var t = getInputVal(e, "OPERAND1"),
        o = getInputVal(e, "OPERAND2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("operator_add", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = async function (argument1,argument2) {", " //dosoming", '\nvar argument1_val = await eval(getInputFunObj[argument1]);\nvar argument2_val = await eval(getInputFunObj[argument2]);\n\nconsole.log("相加运算>>>>>"+argument1_val+"+"+argument2_val)\n\nreturn new Promise((resolve, reject)=>{\nresolve(Number(argument1_val)+Number(argument2_val))\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.operator_subtract = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          message0: "%1-%2",
          args0: [{
            type: "input_value",
            name: "OPERAND1"
          }, {
            type: "input_value",
            name: "OPERAND2"
          }],
          extensions: ["output_number"]
        }, colors.operator)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindInputClickModal({
            block: e,
            inputName: "OPERAND1",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "OPERAND2",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.operator_subtract = function(e) {
      var t = getInputVal(e, "OPERAND1"),
        o = getInputVal(e, "OPERAND2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("operator_subtract", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " =async function (argument1,argument2) {", '\nvar argument1_val = await eval(getInputFunObj[argument1]);\nvar argument2_val = await eval(getInputFunObj[argument2]);\n\nconsole.log("相减运算>>>>>"+argument1_val+"-"+argument2_val)\nreturn new Promise((resolve, reject)=>{\nresolve(Number(argument1_val)-Number(argument2_val))\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.operator_multiply = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          message0: "%1*%2",
          args0: [{
            type: "input_value",
            name: "OPERAND1"
          }, {
            type: "input_value",
            name: "OPERAND2"
          }],
          extensions: ["output_number"]
        }, colors.operator)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindInputClickModal({
            block: e,
            inputName: "OPERAND1",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "OPERAND2",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.operator_multiply = function(e) {
      var t = getInputVal(e, "OPERAND1"),
        o = getInputVal(e, "OPERAND2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("operator_multiply", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " =async function (argument1,argument2) {", '\nvar argument1_val = await eval(getInputFunObj[argument1]);\nvar argument2_val = await eval(getInputFunObj[argument2]);\n\nconsole.log("相乘运算>>>>>"+argument1_val+"*"+argument2_val)\nreturn new Promise((resolve, reject)=>{\nresolve(Number(argument1_val)*Number(argument2_val))\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.operator_divide = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          message0: "%1/%2",
          args0: [{
            type: "input_value",
            name: "OPERAND1"
          }, {
            type: "input_value",
            name: "OPERAND2"
          }],
          extensions: ["output_number"]
        }, colors.operator)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindInputClickModal({
            block: e,
            inputName: "OPERAND1",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "OPERAND2",
            fieldName: "TEXT",
            modalType: "NUM_KEYBOARD",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.operator_divide = function(e) {
      var t = getInputVal(e, "OPERAND1"),
        o = getInputVal(e, "OPERAND2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("operator_divide", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " =async function (argument1,argument2) {", '\nvar argument1_val = await eval(getInputFunObj[argument1]);\nvar argument2_val = await eval(getInputFunObj[argument2]);\n\nconsole.log("相除运算>>>>>"+argument1_val+"/"+argument2_val)\nreturn new Promise((resolve, reject)=>{\nresolve(Number(argument1_val)/Number(argument2_val))\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.operator_and = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          message0: "%1" + _LANGUAGE2.default.TEXT_AND[lang] + "%2",
          args0: [{
            type: "input_value",
            name: "OPERAND1",
            check: "Boolean"
          }, {
            type: "input_value",
            name: "OPERAND2",
            check: "Boolean"
          }],
          extensions: ["output_boolean"]
        }, colors.operator)), this.onchange = function(t) {
          "create" == t.type && bindMousedownWithOpenModal(e)
        }
      }
    }, _javascript_compressed2.default.JavaScript.operator_and = function(e) {
      var t = getInputVal(e, "OPERAND1"),
        o = getInputVal(e, "OPERAND2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("operator_and", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " =async function (argument1,argument2) {", '\nvar argument1_val = await eval(getInputFunObj[argument1]);\nvar argument2_val = await eval(getInputFunObj[argument2]);\n\nconsole.log("且运算>>>>>"+argument1_val+"&&"+argument2_val)\n\nreturn new Promise((resolve, reject)=>{\nresolve(Boolean(argument1_val)&&Boolean(argument2_val))\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.operator_or = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          message0: "%1" + _LANGUAGE2.default.TEXT_OR[lang] + "%2",
          args0: [{
            type: "input_value",
            name: "OPERAND1",
            check: "Boolean"
          }, {
            type: "input_value",
            name: "OPERAND2",
            check: "Boolean"
          }],
          extensions: ["output_boolean"]
        }, colors.operator)), this.onchange = function(t) {
          "create" == t.type && bindMousedownWithOpenModal(e)
        }
      }
    }, _javascript_compressed2.default.JavaScript.operator_or = function(e) {
      var t = getInputVal(e, "OPERAND1"),
        o = getInputVal(e, "OPERAND2");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("operator_or", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " =async function (argument1,argument2) {", '\nvar argument1_val = await eval(getInputFunObj[argument1]);\nvar argument2_val = await eval(getInputFunObj[argument2]);\n\nconsole.log("或运算>>>>>"+argument1_val+"||"+argument2_val)\n\nreturn new Promise((resolve, reject)=>{\nresolve(Boolean(argument1_val)||Boolean(argument2_val))\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sound_sounds_menu = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit({
          message0: "声音%1",
          args0: [{
            type: "field_dropdown",
            name: "SOUND_MENU",
            options: [
              ["羊", "0"],
              ["青蛙", "1"],
              ["狗1", "2"],
              ["狗2", "3"],
              ["鸭子", "4"],
              ["鹅", "5"],
              ["马1", "6"],
              ["马2", "7"],
              ["猫", "8"],
              ["牛", "9"],
              ["弹簧", "10"],
              ["咬", "11"],
              ["砰", "12"],
              ["波普", "13"],
              ["喇叭", "14"],
              ["口哨", "15"],
              ["钟声", "16"],
              ["车笛", "17"],
              ["车", "18"],
              ["蜂鸣", "19"],
              ["当当当", "20"],
              ["锣", "21"],
              ["哨子", "22"],
              ["胜利", "23"],
              ["传送", "24"],
              ["欢呼", "25"],
              ["塔达", "26"],
              ["钹声", "27"],
              ["洞穴", "28"],
              ["跳舞", "29"],
              ["中世纪", "30"],
              ["木乃伊", "31"],
              ["门铃", "32"],
              ["魔术", "33"],
              ["A钢琴", "34"],
              ["B钢琴", "35"],
              ["C钢琴", "36"],
              ["D钢琴", "37"],
              ["E钢琴", "38"],
              ["F钢琴", "39"],
              ["G钢琴", "40"]
            ]
          }],
          colour: _javascript_compressed2.default.Colours.sounds.secondary,
          colourSecondary: _javascript_compressed2.default.Colours.sounds.secondary,
          colourTertiary: _javascript_compressed2.default.Colours.sounds.tertiary,
          output: "soundNumber",
          outputShape: _javascript_compressed2.default.OUTPUT_SHAPE_ROUND
        }), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "SOUND_MENU",
            modalType: "CHOOSE_SOUND",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sound_sounds_menu = function(e) {
      var t = e.getFieldValue("SOUND_MENU");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sound_sounds_menu", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument1) {", 'console.log("歌曲》》"+argument1)', " //dosoming", " return argument1", "};"]) + "(" + t + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sensor_cp_val = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          id: "steer_run_angle",
          message0: "%1",
          message1: _LANGUAGE2.default.TEXT_CPCGQ[lang] + "%1" + _LANGUAGE2.default.TEXT_JCD[lang] + "%2",
          args0: [{
            type: "field_image",
            name: "icon_img",
            src: _javascript_compressed2.default.mainWorkspace.options.pathToMedia + "block/触碰传感器.png",
            width: 40,
            height: 40,
            alt: "When green flag clicked",
            flip_rtl: !0
          }],
          args1: [{
            type: "field_dropdown",
            name: "INTERFACE_OPTION",
            options: [
              [_LANGUAGE2.default.TEXT_JK[lang] + "A", "1"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "B", "2"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "C", "3"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "D", "4"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "E", "5"],
              [_LANGUAGE2.default.TEXT_JK[lang] + "F", "6"]
            ]
          }, {
            type: "field_dropdown",
            name: "SWITCH_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_BAY[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_BSK[lang], "0"]
            ]
          }]
        }, colors.sensor, {
          extensions: ["output_boolean"]
        })), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "INTERFACE_OPTION",
            modalType: "CHOOSE_PORT",
            callback: null
          }), bindFieldClickModal({
            block: e,
            fieldName: "SWITCH_OPTION",
            modalType: "CHOOSE_SWITCH",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sensor_cp_val = function(e) {
      var t = e.getFieldValue("INTERFACE_OPTION"),
        o = e.getFieldValue("SWITCH_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sensor_cp_val", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " =async function (argument0,argument1) {", 'console.log("检测"+argument0+"口触碰传感器的值是否为"+argument1+""+"----")', '\nreturn new Promise((resolve, reject)=>{\nwindow.getSensorValByBlue(["0x49","0x0"+argument0,"0x03","0x00","0x00","0xff"],function(str){\nconsole.log("比较触碰值",Number(str),Number(argument1))\nresolve(Number(str)==Number(argument1))\n})\n})\n', "};"]) + "(" + t + "," + o + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.lamp_choose = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit({
          message0: _LANGUAGE2.default.TEXT_CD[lang] + "%1",
          args0: [{
            type: "field_dropdown",
            name: "SWITCH_OPTION",
            options: [
              ["" + _LANGUAGE2.default.TEXT_DK[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_GB[lang], "0"]
            ]
          }],
          category: _javascript_compressed2.default.Categories.sound,
          extensions: ["colours_sounds", "shape_statement"]
        }), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "SWITCH_OPTION",
            modalType: "CHOOSE_SWITCH",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.lamp_choose = function(e) {
      var t = e.getFieldValue("SWITCH_OPTION");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("lamp_choose", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument1) {", 'console.log("车灯控制==》"+argument1)', retrunPromiseAndStopStr('\nwindow.setLampByBlue(["0x50","0x03","0x01","0x00","0x0"+argument1,"0x04","0x01","0x00","0x01","0x00"],function(str){\nresolve()\n})\n'), "};"]) + "(" + t + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.sound_playuntildone = {
      customContextMenu: customContextMenuFn,
      init: function() {
        var e = this;
        this.jsonInit({
          message0: _LANGUAGE2.default.TEXT_BFSY[lang] + "%1",
          args0: [{
            type: "field_dropdown",
            name: "SOUND_MENU",
            options: [
              ["" + _LANGUAGE2.default.TEXT_MUSC_Y[lang], "0"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_QW[lang], "1"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_G1[lang], "2"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_G2[lang], "3"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_YZ[lang], "4"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_E[lang], "5"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_M1[lang], "6"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_M2[lang], "7"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_MAO[lang], "8"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_NIU[lang], "9"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_TANGH[lang], "10"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_YAO[lang], "11"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_PING[lang], "12"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_BOPU[lang], "13"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_LABA[lang], "14"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_KOUS[lang], "15"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_ZHONGS[lang], "16"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_CHED[lang], "17"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_CHE[lang], "18"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_FENGM[lang], "19"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_DDDD[lang], "20"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_LUO[lang], "21"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_SAOZ[lang], "22"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_SHENL[lang], "23"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_CHUANS[lang], "24"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_HUANH[lang], "25"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_TADA[lang], "26"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_BASHENG[lang], "27"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_DONGXUE[lang], "28"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_TIAOWU[lang], "29"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_ZHONGSJ[lang], "30"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_MUNAIY[lang], "31"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_MENL[lang], "32"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_MOSHU[lang], "33"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_GANGQA[lang], "34"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_GANGQB[lang], "35"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_GANGQC[lang], "36"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_GANGQD[lang], "37"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_GANGQE[lang], "38"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_GANGQF[lang], "39"],
              ["" + _LANGUAGE2.default.TEXT_MUSC_GANGQG[lang], "40"]
            ]
          }],
          category: _javascript_compressed2.default.Categories.sound,
          extensions: ["colours_sounds", "shape_statement"]
        }), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "SOUND_MENU",
            modalType: "CHOOSE_SOUND",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.sound_playuntildone = function(e) {
      var t = e.getFieldValue("SOUND_MENU");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("sound_playuntildone", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument1) {", 'console.log("播放歌曲==》"+argument1)', retrunPromiseAndStopStr('\nvar num = Number(argument1+1).toString(16)\nif(!num[1]){\nnum="0"+num\n}\nwindow.setMuiscByBlue(["0x67","0x01","0x"+num,"0x01","0x00"],function(str){\nresolve()\n})\n'), "};"]) + "(" + t + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, window.vars = {}, window.vars["" + _LANGUAGE2.default.TEXT_VAR1[lang]] = {
      val: "0",
      blockIds: [],
      dropDownBlockIds: []
    }, window.getVarValbyName = function(e) {
      return console.log(window.vars[e].val, "window.vars[name].val" + e), window.vars[e].val
    }, window.resetVars = function(e, t) {}, window.getOptionByVars = function(e) {
      return Object.keys(e)
        .map((function(e) {
          return [e, e]
        }))
    }, window.resetVarVal = function(e, t) {
      window.vars[e].blockIds.map((function(o) {
        window.workspace.getBlockById("" + o) && (window.vars[e].val = t)
      }))
    }, window.addVarVal = function(e, t) {
      var o = window.vars[e],
        n = 0,
        i = !1;
      o.blockIds.map((function(o) {
        var a = window.workspace.getBlockById("" + o);
        console.log(window.vars[e].val, a, "var"), a && 0 == i ? (i = !0, n = Number(window.vars[e].val) + Number(t), window.vars[e].val = Number(window.vars[e].val) + Number(t), console.log(window.vars[e].val, "varAdded")) : a = n
      }))
    }, window.resetVarKey = function(e, t) {
      var o = (0, _extends3.default)({}, window.vars[e]);
      window.vars[t] = o, window.vars[t].blocks.map((function(e) {
        window.workspace.getBlockById(e)
          .setFieldValue(t, "VARNAME")
      })), window.vars[t].dropDownBlockIds.map((function(e) {
        window.workspace.getBlockById(e)
          .setFieldValue(t, "VARVAL")
      })), delete window.vars[e]
    }, window.addVarBlock = function(e) {
      var t = window.workspace.getBlockById(e),
        o = t.getFieldValue("VARNAME"),
        n = t.getFieldValue("VARVAL"),
        i = -1;
      window.vars[o] ? i = window.vars[o].blockIds.indexOf(t.id) : window.vars[o] = {
        val: n,
        blockIds: [],
        dropDownBlockIds: []
      }, i < 0 && window.vars[o].blockIds.push(t.id)
    }, window.removeVarBlock = function(e) {
      var t = window.workspace.getBlockById(e),
        o = t.getFieldValue("VARNAME");
      if ((n = window.vars[o].blockIds.indexOf(t.id)) > -1) {
        var n = window.vars[o].blockIds.indexOf(t.id);
        window.vars[o].blockIds.splice(n, 1)
      }
    }, window.addEditVarBlock = function(e) {
      var t = window.workspace.getBlockById(e),
        o = t.getFieldValue("VARIABLE");
      window.vars[o].dropDownBlockIds.indexOf(t.id) < 0 && window.vars[o].dropDownBlockIds.push(t.id)
    }, window.removeEditVarBlock = function(e) {
      var t = window.workspace.getBlockById(e),
        o = t.getFieldValue("VARIABLE");
      if ((n = window.vars[o].dropDownBlockIds.indexOf(t.id)) > -1) {
        var n = window.vars[o].dropDownBlockIds.indexOf(t.id);
        window.vars[o].dropDownBlockIds.splice(n, 1)
      }
    }, _javascript_compressed2.default.Blocks.variable_own = {
      init: function() {
        var e = this;
        this.jsonInit((0, _extends3.default)({
          message0: "%1",
          message1: "%1",
          args0: [{
            type: "field_label_serializable",
            text: "" + _LANGUAGE2.default.TEXT_VAR1[lang],
            name: "VARNAME"
          }],
          args1: [{
            type: "field_image",
            src: 0,
            width: 0,
            height: 0,
            name: "VARVAL",
            flip_rtl: !0
          }],
          extensions: ["output_string"]
        }, colors.variableOwn)), this.onchange = function(t) {
          window.addVarBlock(e.id), "create" == t.type && (bindMousedownWithOpenModal(e), setWhiteText(e), console.log(e.getField("VARNAME")
            .text_, "VARNAME"), window.addVarBlock(e.id), console.log("create", window.vars)), "delete" == t.type && (window.removeVarBlock(e.id), console.log("delete", window.vars))
        }
      }
    }, _javascript_compressed2.default.JavaScript.variable_own = function(e) {
      var t = e.getFieldValue("VARNAME");
      this.getField("VARVAL")
        .src_;
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("variable_own", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument1) {", 'console.log(""+argument1)', " //dosoming", "return window.getVarValbyName(argument1)", "};"]) + "('" + t + "')", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.data_setvariableto = {
      init: function() {
        var e = this,
          t = getOptionByVars(window.vars);
        this.jsonInit((0, _extends3.default)({
          message0: _LANGUAGE2.default.TEXT_JJJ[lang] + "%1" + _LANGUAGE2.default.TEXT_SET[lang] + "%2",
          args0: [{
            type: "field_dropdown",
            name: "VARIABLE",
            options: t
          }, {
            type: "input_value",
            name: "VALUE"
          }],
          extensions: ["shape_statement"]
        }, colors.variable)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "VARIABLE",
            modalType: "SET_VAROPTION",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "VALUE",
            fieldName: "TEXT",
            modalType: "SET_TEXT",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.data_setvariableto = function(e) {
      var t = e.getFieldValue("VARIABLE"),
        o = getInputVal(e, "VALUE");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("data_setvariableto", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " =async function (argument1,argument2) {", '\nvar val = await eval(getInputFunObj[argument2])\nconsole.log("设置变量》》"+argument1+"为"+val)\n', "window.resetVarVal(argument1,val)", "  //dosoming", retrunPromiseAndStopStr(), "};"]) + "('" + t + "'," + o + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.data_setvariable_add = {
      init: function() {
        var e = this,
          t = getOptionByVars(window.vars);
        this.jsonInit((0, _extends3.default)({
          message0: _LANGUAGE2.default.TEXT_JJJ[lang] + "%1" + _LANGUAGE2.default.TEXT_ADD[lang] + "%2",
          args0: [{
            type: "field_dropdown",
            name: "VARIABLE",
            options: t
          }, {
            type: "input_value",
            name: "VALUE"
          }],
          extensions: ["shape_statement"]
        }, colors.variable)), this.onchange = function(t) {
          "create" == t.type && (bindMousedownWithOpenModal(e), bindFieldClickModal({
            block: e,
            fieldName: "VARIABLE",
            modalType: "SET_VAROPTION",
            callback: null
          }), bindInputClickModal({
            block: e,
            inputName: "VALUE",
            fieldName: "TEXT",
            modalType: "SET_NUM",
            callback: null
          }))
        }
      }
    }, _javascript_compressed2.default.JavaScript.data_setvariable_add = function(e) {
      var t = e.getFieldValue("VARIABLE"),
        o = getInputVal(e, "VALUE");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("data_setvariable_add", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " =async function (argument1,argument2) {", '\nvar val = await eval(getInputFunObj[argument2])\nconsole.log("增加变量》》"+argument1+"值为"+val)\n', "window.addVarVal(argument1,val)", "  //dosoming", retrunPromiseAndStopStr(), "};"]) + "('" + t + "'," + o + ");\n", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.data_changevariableby = {
      init: function() {
        this.jsonInit({
          message0: _javascript_compressed2.default.Msg.DATA_CHANGEVARIABLEBY,
          args0: [{
            type: "field_variable",
            name: "VARIABLE"
          }, {
            type: "input_value",
            name: "VALUE"
          }],
          category: _javascript_compressed2.default.Categories.data,
          extensions: ["colours_data", "shape_statement"]
        })
      }
    }, _javascript_compressed2.default.JavaScript.data_changevariableby = function(e) {
      var t = e.getFieldValue(e, "VARIABLE");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("data_changevariableby", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument1) {", 'console.log("播放歌曲==》"+argument1)', " //dosoming", "};"]) + "(" + t + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.data_showvariable = {
      init: function() {
        this.jsonInit({
          message0: _javascript_compressed2.default.Msg.DATA_SHOWVARIABLE,
          args0: [{
            type: "field_variable",
            name: "VARIABLE"
          }],
          previousStatement: null,
          nextStatement: null,
          category: _javascript_compressed2.default.Categories.data,
          colour: _javascript_compressed2.default.Colours.data.primary,
          colourSecondary: _javascript_compressed2.default.Colours.data.secondary,
          colourTertiary: _javascript_compressed2.default.Colours.data.tertiary
        })
      }
    }, _javascript_compressed2.default.JavaScript.data_showvariable = function(e) {
      var t = e.getFieldValue(e, "VARIABLE");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("data_showvariable", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument1) {", 'console.log("播放歌曲==》"+argument1)', " //dosoming", "};"]) + "(" + t + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, _javascript_compressed2.default.Blocks.data_hidevariable = {
      init: function() {
        this.jsonInit({
          message0: _javascript_compressed2.default.Msg.DATA_HIDEVARIABLE,
          args0: [{
            type: "field_variable",
            name: "VARIABLE"
          }],
          previousStatement: null,
          nextStatement: null,
          category: _javascript_compressed2.default.Categories.data,
          colour: _javascript_compressed2.default.Colours.data.primary,
          colourSecondary: _javascript_compressed2.default.Colours.data.secondary,
          colourTertiary: _javascript_compressed2.default.Colours.data.tertiary
        })
      }
    }, _javascript_compressed2.default.JavaScript.data_hidevariable = function(e) {
      var t = e.getFieldValue(e, "VARIABLE");
      return ["//" + _javascript_compressed2.default.JavaScript.provideFunction_("data_hidevariable", ["window." + _javascript_compressed2.default.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + " = function (argument1) {", 'console.log("播放歌曲==》"+argument1)', " //dosoming", "};"]) + "(" + t + ")", _javascript_compressed2.default.JavaScript.ORDER_FUNCTION_CALL]
    }, exports.default = _javascript_compressed2.default
  }